package daobeauty.interceptor.invoke.crud;

import org.hibernate.Session;

public class ArrayCrud implements CrudStrategy{
	private CrudAction action;
	
	public ArrayCrud(CrudAction action){
		this.action = action;
	}
	
	public void apply(Session session, Object o) {
		final Object [] col = (Object []) o;
		for (Object x:col){
			action.execute(session, x);
		}
	}
	
	public String toString(){
		return "array";
	}
}
